package cn.db101.fairy.controller

import cn.db101.fairy.model.PullQrcodeRequest
import cn.db101.fairy.model.ResultModel
import cn.db101.fairy.service.UserService
import cn.db101.fairy.service.WxService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

/**
 * @author zooy
 * @since 2025/3/26-11:36
 */
@RestController
@RequestMapping("v1/fairy/user")
class UserController {

    @Autowired
    lateinit var wxService: WxService

    /**
     * 拉取小程序码
     */
    @PostMapping("pullMiniQrcode")
    fun pullMiniQrcode(@RequestBody pullQrcodeRequest: PullQrcodeRequest): ResultModel<Any> {

        return ResultModel.wrapSuccessResult(wxService.pullQrcode(pullQrcodeRequest))
    }

}
